package com.glaze.learn.controller;

import com.glaze.learn.dto.User;
import com.glaze.learn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Description:
 * @auther ZhouLiGuo
 * @Date 2020/10/25 1:11 上午:50
 * @Version 1.0
 */
@RequestMapping("/user")
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public List<User> findList() {
        return userService.findList();
    }
}
